<%@page import="Entities.*"%>
<%@page import="Helpers.*"%>
<%@page import="Hibernate.*"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

   <li class="likert">
      <table cellspacing="0">
        <thead>
            <tr>
                <th>Toets naam</th>
                <td>Aantal vragen in toets</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
        </thead>
        <tbody>
            <%
              ToetsenHelper tHelper = new ToetsenHelper();
              CursusHelper cHelper = new CursusHelper();

              List<Toetsen> toetsen = tHelper.getToetsenperCursus(Integer.parseInt(id));
              for (Toetsen toets : toetsen) {
                   Cursussen cursus = cHelper.getCursus(toets.getCursusId());
            %>
            <tr>
                <th>
                    <%=toets.getNaam() %>
                </th>
                <td>
                    <%=toets.getAantalVragen()%>
                </td>
                <td>
                    <a href="webpages/Toetsen/showToets.jsp?id=<%= toets.getId()%>"><img src="images/edit.png" border="0" /></a>
                    <a href="webpages/Toetsen/deleteToets.jsp?id=<%= toets.getId()%>"><img src="images/delete.png" border="0" /></a>
                </td>
                <td>
                    <a class="btn" href="webpages/ToetsVragen/showToetsVragen.jsp?tid=<%=toets.getId()%>">Vragen</a>
                </td>
            </tr>
         <% } %>
        </tbody>
    </table>
</li>

<p><a class="btn" href="webpages/Toetsen/addToets.jsp">Toevoegen toets</a></p>


